import { defineStore } from 'pinia'
import { ref } from 'vue'
import * as systemApi from "@/api/system"

export const useAppStore = defineStore('app', () => {
	const config = ref<any>({
		appId: "wxa5c05ed450739183"
	})

	async function doPayment(param ?: any) {
		const response = await systemApi.doPayment(param)
		if (response.code === 200) {
			return response.data
		}
		return {}
	}

	return {
		config,
		doPayment
	}
})